home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / PageMaker 6.5 SDK Mac / SourceCode / PageMakerClassLibrary / Queries / PStringListQuery.h < prev    next >
C/C++ Source or Header  |  1996-07-13  |  2KB  |  61 lines

  1. /*
  2.  *--- PStringListQuery.h --------------------------------------------------
  3.  * Copyright (c) 1995-96 Adobe Systems Incorporated.  All rights reserved.
  4.  * Created on Thu, Oct 12, 1995 @ 10:06 PM by Paul Ferguson.
  5.  *
  6.  * Description:  This is the base class for query classes that consist of
  7.  * a count field (short) in the first two bytes, followed by that number
  8.  * of strings.  The template class PStringListQuery.h contains the
  9.  * instantiations of the various classes that are of this type.
  10.  *-------------------------------------------------------------------------
  11.  */
  12. #ifndef __PStringListQuery__
  13. #define __PStringListQuery__
  14. #ifdef __MWERKS__
  15. #pragma once
  16. #endif
  17.  
  18. #include "PListQuery.h"
  19.  
  20. #include "PMTypes.h"
  21.  
  22. class PStringListQuery : public PListQuery
  23. {
  24.  
  25. public:
  26.  
  27.     operator const char *() { return aString; }
  28.  
  29. protected:
  30.     PStringListQuery() {}
  31.     PStringListQuery(ePMQuery query);
  32.     const char * aString;
  33.  
  34.     virtual void Scan();
  35. };
  36.  
  37.  
  38. template <ePMQuery QUERY>
  39. class PStringListy : public PStringListQuery
  40. {
  41.  
  42. public:
  43.  
  44.     PStringListy() : PStringListQuery(QUERY) { }
  45. };
  46.  
  47. typedef PStringListy<pm_getcolornames>             PGetColorNames;
  48. typedef PStringListy<pm_getinknames>            PGetInkNames;
  49. typedef PStringListy<pm_getpapersizes>            PGetPaperSizes;
  50. typedef PStringListy<pm_getpapersources>        PGetPaperSources;
  51. typedef PStringListy<pm_getprinterlist>            PGetPrinterList;
  52. typedef PStringListy<pm_getprinterstyles>        PGetPrinterStyles;
  53. typedef PStringListy<pm_getprintfeaturetitles>    PGetPrintFeatureTitles;
  54. typedef PStringListy<pm_getprintppds>            PGetPrintPPDs;
  55. typedef PStringListy<pm_getprintscreens>        PGetPrintScreens;
  56. typedef PStringListy<pm_getstylenames>            PGetStyleNames;
  57.  
  58. #endif
  59.  
  60. // end of PStringListQuery.h
  61.